﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ImportExcel.aspx.cs" Inherits="Catering.Catering_Page.Kufang.ImportExcel" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title></title>
    <link rel="stylesheet" type="text/css" href="../../Style/head.css" />
    <link rel="stylesheet" type="text/css" href="../../Style/center.css" />
    <link href="../../Style/zhezhao.css" rel="stylesheet" type="text/css" />
    <script src="../../Scripts/jquery-1.4.1.js" type="text/javascript"></script>
    <script src="../../Style/xxk.js" type="text/javascript"></script>
    <script src="../../Style/zhezhao.js" type="text/javascript"></script>
    <script language="javascript" type="text/javascript" src="../../Scripts/My97DatePicker/WdatePicker.js"></script>
    <style type="text/css">
        .Create_Recipe
        {
            margin-top: 0;
        }
        .Create_Recipe
        {
            border: 1px solid #159aec;
            border-top: none;
            width: 998px;
        }
        .soso_lt
        {
            padding: 5px 0;
        }
        .soso_lt a
        {
            margin-left: 3px;
        }
        .style1
        {
            width: 100%;
        }
        .div_120
        {
            padding-top: 5px;
            background-color: #e5f1ff;
        }
        .div_120 ul
        {
            width: 996px;
            clear: both;
        }
        .div_120 li
        {
            float: left;
            height: 25px;
            line-height: 25px;
            margin-left: 10px;
        }
        .div_120 span
        {
            text-align: left;
            display: -moz-inline-box;
            display: inline-block;
            width: 60px;
        }
    </style>
    <script language="javascript" type="text/ecmascript">

        function Del_row_Info(dates) {

            if (dates.toString().length > 0) {
                $.ajax({
                    type: "Post",
                    url: "../../PostDate.aspx/Del_Excel_Out",
                    data: "{'Del_Id':'" + dates + "'}",
                    contentType: "application/json; charset=utf-8",
                    dataType: "json",
                    success: function (data) {
                        if (data.d == "OK") {
                            alert("删除成功!");
                            window.location = "Rkgl.aspx";
                        }
                    }
                });
            }
        }
    </script>
    <script language="javascript" type="text/javascript">
        function BT_daoru_Click() {
            divhidel("div2", "div3");
            $("#excel_input").click();
        }
        function but_excel_click() {
            divshow("div2", "div3");
        }
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <asp:HiddenField ID="IsYanzhen" runat="server" />
    <asp:HiddenField ID="HFGroupID" runat="server" />
    <asp:HiddenField ID="HFClassID" runat="server" />
    <asp:Button ID="excel_input" runat="server" OnClick="BT_daoru_Click" Style="display: none" />
    <div class="Center_Content" id="div1" style="display: block">
        <div class="div_0207 left_width500 div_120" style="height:34px; width: 998px;">
        <table cellpadding="0" cellspacing="0" border="0" width="100%">
            <tr>
                <td align="center" width="150"><asp:FileUpload ID="FileUpload1" runat="server" CssClass="input_bg" Width="140" Height="26"  /></td>
                <td width="90"><asp:Button ID="ExceltoDataSet" runat="server" Text="导入Excel" class="input_btn_a"
                        OnClick="BT_daoru_Click" /></td>
                <td align="center" width="75">添加日期：</td>
                <td width="90"><asp:TextBox ID="txt_addtime" runat="server" Width="80px" CssClass="input_bg"></asp:TextBox></td>
                <td width="100"><asp:Button ID="TB_baocun" Enabled="false" runat="server" Text="保存Excel" CssClass="input_btn_a"
                        OnClick="TB_baocun_Click" /></td>
                <td width="100"><asp:LinkButton ID="lb_rest" CssClass="input_btn_a" Text="返回" runat="server" PostBackUrl="Rkgl.aspx"
                        OnClick="lb_rest_Click"></asp:LinkButton></td>
                <td width="100">没有原料<asp:Label ID="Label1" runat="server"
                    Style="background-color: Red; height: 12px; width: 30px"></asp:Label></td>
                <td width="100">超过警戒<asp:Label ID="Label13" runat="server" Style="background-color:#7F7F00;
                    height: 12px; width: 30px"></asp:Label></td>
                <td width="100">单位不一致<asp:Label ID="Label14" runat="server" Style="background-color:#AABFAA;
                    height: 12px; width: 30px"></asp:Label></td>
                <td width="100">智能转换<asp:Label ID="Label6" runat="server" Style="background-color:#96E23F;
                    height: 12px; width: 30px"></asp:Label></td>
                <td>&nbsp;</td>
            </tr>
        </table>
        </div>
        <div style="height: 10px; clear: both;">
        </div>
        <div style="width: 998px; border: #c2def6 1px solid;">
            <table width="100%" border="0" class="swxx_table" id="tb" cellpadding="0" cellspacing="0">
                <thead>
                    <tr>
                        <td>
                            序号
                        </td>
                        <td>
                            品号
                        </td>
                        <td>
                            单据日期
                        </td>
                        <td>
                            品名
                        </td>
                        <td>
                            规格
                        </td>
                        <td>
                            入库数量
                        </td>
                        <td>
                            单位
                        </td>
                        <td>
                            单价
                        </td>
                        <td>
                            金额
                        </td>
                        <td>
                            备注
                        </td>
                    </tr>
                </thead>
                <tbody id="rukuguanli">
                    <asp:Repeater ID="Repeater1" runat="server">
                        <ItemTemplate>
                            <tr style='<%# this.GetStyle(Eval("temp2").ToString()) %>'>
                                <th style="border-bottom: 1px solid #ccc; background-color: #f5f5f5; border-right: 1px solid #ccc;
                                    height: 32px">
                                    <asp:Label ID="Label1" runat="server" Text='<%# Eval("id") %>'></asp:Label>
                                </th>
                                <td>
                                    <asp:Label ID="Label2" runat="server" Text='<%# Eval("InDBid") %>'></asp:Label>
                                </td>
                                <td>
                                    <asp:Label ID="Label3" runat="server" Text='<%# Convert.ToDateTime(Eval("PiaoDate")).ToString("yyyy/MM/dd")%>'></asp:Label>
                                </td>
                                <td>
                                    <asp:Label ID="Label4" runat="server" Text='<%# Eval("RAW") %>'></asp:Label>
                                </td>
                                <td>
                                    <asp:Label ID="Label5" runat="server" Text='<%# Eval("Specifications") %>'></asp:Label>
                                </td>
                                <td>
                                    <asp:Label ID="Label7" runat="server" Text='<%# Eval("Number") %>'></asp:Label>
                                </td>
                                <td>
                                    <asp:Label ID="Label8" runat="server" Text='<%# Eval("CMP") %>'></asp:Label>
                                </td>
                                <td>
                                    <asp:Label ID="Label9" runat="server" Text='<%# Eval("Price") %>'></asp:Label>
                                </td>
                                <td>
                                    <asp:Label ID="Label11" runat="server" Text='<%# Eval("Weight") %>'></asp:Label>
                                </td>
                                <td>
                                    <asp:Label ID="Label12" runat="server" Text='<%# Eval("Back") %>'></asp:Label>
                                </td>
                            </tr>
                        </ItemTemplate>
                    </asp:Repeater>
                </tbody>
            </table>
            <div id="errordiv" runat="server" style="width: 978px;line-height:28px; padding:10px;">
                
            </div>
        </div>
    </div>
        <div class="footer">
            <strong>中海油能源发展配餐服务公司渤海自营油田作业公司&nbsp;&nbsp;版权所有@CopyRight 2012</strong><span>技术支持：北京天择嘉业科技有限公司</span></div>
    </form>
</body>
</html>
